﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lanting.Model
{
    /// <summary>
    /// 列表控件中列的数据对象
    /// </summary>
    public class ColumnData
    {
        /// <summary>
        /// 列名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 绑定列名
        /// </summary>
        public string fieldName { get; set; }
        /// <summary>
        /// 显示列名
        /// </summary>
        public string caption { get; set; }
        /// <summary>
        /// 是否可见
        /// </summary>
        public bool isVisible { get; set; }
        /// <summary>
        /// 列格式控件类型
        /// </summary>
        public ColumnEditType columnEditType { get; set; }

        public ColumnData()
        {

        }
        public ColumnData(string _name, string _fieldName, string _caption)
        {
            name = _name;
            fieldName = _fieldName;
            caption = _caption;
            isVisible = true;
            columnEditType = ColumnEditType.text;
        }
        public ColumnData(string _name, string _filedName, string _caption, bool _isVisible)
        {
            name = _name;
            fieldName = _filedName;
            caption = _caption;
            isVisible = _isVisible;
            columnEditType = ColumnEditType.text;
        }
        public ColumnData(string _name, string _filedName, string _caption, bool _isVisible, ColumnEditType _columnEditType)
        {
            name = _name;
            fieldName = _filedName;
            caption = _caption;
            isVisible = _isVisible;
            columnEditType = _columnEditType;
        }
    }

    public enum ColumnEditType
    {
        text, date, dateTime, dateTime1,button
    }
}
